package com.frame.dao;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.frame.entity.Account;

public interface AccountDao {
	
	// 读取用户信息
	@Transactional(readOnly = true)
	Account read(String username);

	// 读取用户信息
	@Transactional(readOnly = true)
	Account read(Integer id);
	
	// 事务控制
	@Transactional(readOnly = false, rollbackFor = Exception.class)
	Account register(Account account);
}
